
def _getMatrix():
   matrix = []
   for i in range(3):
      row = [float(num) for num in input().strip().split(" ")]
      matrix.append(row)
   return matrix

def solve(matrix):

    n = 3
    for i in range(n):
        pivot = matrix[i][i]
        if pivot == 0:
            continue

        for j in range(i, 2 * n):
            matrix[i][j] /= pivot

        for k in range(n):
            if k != i:
                factor = matrix[k][i]
                for j in range(i, 2 * n):
                    matrix[k][j] -= factor * matrix[i][j]


    solution = []
    for i in range(n):
        solution.append([matrix[i][n + j] for j in range(n)])

    return solution




matrix=_getMatrix()
ans=solve(matrix)


for row in ans:
    for num in row:
        if(abs(num)<0.00001):
            num=0
        print("%.3f"%num, end=" ")
    print()